import Vue from 'vue'
import VueRouter from 'vue-router'
import original from "../components/Findpage/original"
import findright from "../components/Findpage/findright"
import title from "../components/Findpage/title"
// import title from "../components/Findpage/title"
Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    name: 'Home',
    component: () => import('../views/Home.vue'),

  },
  {
    path: '/AA',
    name: 'AA',
    component: () => import('../views/attention.vue')
  },
  {
    path: '/Home',
    name: 'Home',
    component: () => import('../views/Home.vue'),

  },
  {
    path: '/Mine',
    name: 'Mine',
    component: () => import('../views/Mine.vue'),
    // beforeEnter: (to, from, next) => {
    //   next("/login")
    // }
  },
  {
    path: '/Search',
    name: 'Search',
    component: () => import('../views/Search.vue'),
    children: [

      {
        path: '/original',
        name: 'original',
        component: original
      },
      {
        path: '/findright',
        name: 'findright',
        component: findright
      },
      {
        path: '/title',
        name: 'title',
        component: title
      },
      {
        path: '/',
        name: 'findright',
        component: findright
      }

    ]
  },
  {
    path: '/rigster',
    name: 'rigster',
    component: () => import('../views/rigster.vue')
  },
  {
    path: '/Vip',
    name: 'Vip',
    component: () => import('../views/Vip.vue')
  },
  {
    path: '/log',
    name: 'log',
    component: () => import('../views/login.vue')
  },
  {
    path: '/Today',
    name: 'Today',
    component: () => import('../views/today.vue')
  },

  {
    path: '/Hot',
    name: 'Hot',
    component: () => import('../views/remen.vue')
  },
  {
    path: '/Newactive',
    name: 'Newactive',
    component: () => import('../views/newactive.vue')
  },
  {
    path: '/xiangqing/:xx',
    name: 'xiangqing',
    component: () => import('../views/xiangqing.vue')
  },
  {
    path: '/all',
    name: 'all',
    component: () => import('../views/all/all.vue')
  },
  {
    path: '/shezhi',
    name: 'shezhi',
    component: () => import('../views/shezhi.vue')
  },
  {
    path: '/',
    redirect: "/Home",
    component: () => import('../views/Home.vue')
  },
  {
    path: '*',
    name: 'no',
    component: () => import('../views/no.vue')
  }
]

const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
